package smedi.ismedi.mobile.bff.controller.safetyeducation;

import com.smedi.ismedi.safety.education.api.dto.request.SafetyEducationQueryRequest;
import com.smedi.ismedi.safety.education.api.dto.response.PaginationResponse;
import com.smedi.ismedi.safety.education.api.dto.response.SafetyEducationResponse;
import com.smedi.ismedi.safety.education.api.feign.RemoteSafetyEducationFeignApi;

import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import smedi.ismedi.mobile.bff.controller.BaseController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/mobilebff/v1/safetyEducation")
@AllArgsConstructor
@Api(tags = "节前教育API")
public class SafetyEducationController extends BaseController {
    private final RemoteSafetyEducationFeignApi remoteSafetyEducationFeignApi;


    @ApiOperation(httpMethod = "POST", value = "查询安全教育")
    @PostMapping(value = "/queryAllSafetyEducation")
    public ResponseData<PaginationResponse> getQueryAllSafetyEducation(@RequestBody SafetyEducationQueryRequest safetyEducationQueryRequest) {
        return remoteSafetyEducationFeignApi.getQueryAllSafetyEducation(safetyEducationQueryRequest);
    }
}
